package com.bankapp.network.bank;

import com.bankapp.domain.bank.Bank;

public class ServerStub {
    public String answer(String inputMessage, Bank bank){
        String outMessage;
        switch (inputMessage){
            case "NC":
                outMessage = "Number of clients " + String.valueOf(bank.getClientsArray().length);
                break;
            case "1c":
                if (bank.getClientsArray()[0] == null){
                    outMessage = "The first client is absent";
                } else {
                    outMessage = "The first client is " + bank.getClientsArray()[0].getName() + " " + bank.getClientsArray()[0].getSurname();
                }
                break;
            case "":
                outMessage = "";
                break;
            default:
                outMessage = "Wrong request!";
        }
        return outMessage;
    }
}
